package com.iaiai.notepad.util;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;

import android.graphics.Bitmap;

public class ImageUtil {
	
	/**
	 * ����ͼƬ
	 * @param bitmap ͼƬ
	 * @param fileName ͼƬ·��
	 * @throws IOException
	 */
	public static void saveImageByBitmap(Bitmap bitmap,String fileName) throws IOException{
		File file = new File(fileName);
		file.createNewFile();
        FileOutputStream out = new FileOutputStream(file);
        bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);
        out.flush();
        out.close();
	}

}
